package com.yfp.client.mapper;

import com.yfp.client.domain.LotteryRecordsReward;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yfp.client.domain.vo.LotteryRecordVO;
import com.yfp.client.domain.vo.PrizeListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author admin
* @description 针对表【lottery_records_reward(抽奖-奖品配置表)】的数据库操作Mapper
* @createDate 2025-01-03 09:44:02
* @Entity com.yfp.client.domain.LotteryRecordsReward
*/
public interface LotteryRecordsRewardMapper extends BaseMapper<LotteryRecordsReward> {

    /**
     * 奖品列表
     * @param cityName
     * @return
     */
    List<PrizeListVO> prizeList(String cityName);

    /**
     * 根据活动id获取奖品列表
     * @param lotteryId
     * @return
     */
    List<LotteryRecordVO> selectPrizeByLotteryId(Long lotteryId);

    /**
     * 扣除剩余库存
     * @param lrrId
     */
    void updateRemainingStock(@Param("lrrId") Long lrrId, @Param("distributionQuantity") Integer distributionQuantity);
}




